<?php
class Userimages_Model_Userimages implements Userimages_Model_Mainable {
    
    private $action_handler;
    
    public function main(array $variables = null) {
        if(isset($variables['get']['page'])){
            $this->action_handler = new Userimages_Model_Pagedecision;
            return $this->action_handler->main($variables);
        }
        else {
            $this->action_handler = new Userimages_Data_Getallimages;
            $page['content'] = $this->action_handler->main($variables);
            $page['template'] = WEB_ROOT_FOLDER."userimages/views/userimages.php";
            return $page;
        }
    }
}
